import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';

import 'action.dart';
import 'state.dart';

Widget buildView(
    VillageSimpleState state, Dispatch dispatch, ViewService viewService) {
  return Column(
    children: <Widget>[
      Container(
        color: Colors.grey,
        child: Row(
          children: <Widget>[
            Expanded(
              child: FlatButton(
                child: Text(state.houseNaviString),
                onPressed: () {
                  dispatch(VillageSimpleActionCreator.openHouseChoose());
                },
              ),
            ),
            Text('>'),
          ],
        ),
      ),
      Expanded(
        flex: 1,
        child: viewService.buildComponent('house-info'),
      ),
    ],
  );
}
